Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve the error message when #[panic_implementation] is missing #51921

Merged
merged 2 commits into from
Jul 1, 2018

Conversation

japaric
Copy link
Member

@japaric japaric commented Jun 29, 2018

closes #51341

r? @nagisa
cc @phil-opp

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 29, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:04:21] ......................................................................................i.............
[01:04:27] ...................................i................................................................
[01:04:34] ....................................................................................................
[01:04:39] ....................................................................................................
[01:04:43] ..........................................................................F.........................
[01:04:45] failures:
[01:04:45] 
[01:04:45] ---- [compile-fail] compile-fail/weak-lang-item.rs stdout ----
[01:04:45] 
[01:04:45] 
[01:04:45] error: error pattern ' language item required, but not found: `panic_impl`' not found!
[01:04:45] 
[01:04:45] error: error pattern ' language item required, but not found: `eh_personality`' not found!
[01:04:45] 
[01:04:45] error: multiple error patterns not found
[01:04:45] status: exit code: 101
[01:04:45] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/weak-lang-item.rs" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/weak-lang-item/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/weak-lang-item/auxiliary" "-A" "unused"
[01:04:45] ------------------------------------------
[01:04:45] 
[01:04:45] ------------------------------------------
[01:04:45] stderr:
[01:04:45] stderr:
[01:04:45] ------------------------------------------
[01:04:45] error[E0259]: the name `core` is defined multiple times
[01:04:45]   --> /checkout/src/test/compile-fail/weak-lang-item.rs:18:1
[01:04:45]    |
[01:04:45] LL | extern crate core;
[01:04:45]    | ^^^^^^^^^^^^^^^^^^ `core` reimported here
[01:04:45]    |
[01:04:45]    = note: `core` must be defined only once in the type namespace of this module
[01:04:45] help: You can use `as` to change the binding name of the import
[01:04:45]    |
[01:04:45] LL | extern crate core as other_core;
[01:04:45] 
[01:04:45] 
[01:04:45] error: `#[panic_implementation]` function required, but not found
[01:04:45] 
[01:04:45] error: language item required, but not found: `eh_personality`
[01:04:45] error: aborting due to 3 previous errors
[01:04:45] 
[01:04:45] For more information about this error, try `rustc --explain E0259`.
[01:04:45] 
---
[01:04:45] 
[01:04:45] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[01:04:45] 
[01:04:45] 
[01:04:45] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:04:45] 
[01:04:45] 
[01:04:45] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:04:45] Build completed unsuccessfully in 0:16:24
[01:04:45] Build completed unsuccessfully in 0:16:24
[01:04:45] Makefile:58: recipe for target 'check' failed
[01:04:45] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06365a9b
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@nagisa
Copy link
Member

nagisa commented Jun 29, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Jun 29, 2018

📌 Commit ee52862 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 30, 2018
improve the error message when `#[panic_implementation]` is missing

closes rust-lang#51341

r? @nagisa
cc @phil-opp
kennytm added a commit to kennytm/rust that referenced this pull request Jun 30, 2018
improve the error message when `#[panic_implementation]` is missing

closes rust-lang#51341

r? @nagisa
cc @phil-opp
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Jul 1, 2018
improve the error message when `#[panic_implementation]` is missing

closes rust-lang#51341

r? @nagisa
cc @phil-opp
bors added a commit that referenced this pull request Jul 1, 2018
Rollup of 7 pull requests

Successful merges:

 - #51511 (Stabilize Iterator::flatten in 1.29, fixes #48213.)
 - #51853 (Fix some doc links)
 - #51890 (Fix inconsequential typo in GlobalAlloc doc example)
 - #51920 (use literal span for concrete type suggestion)
 - #51921 (improve the error message when `#[panic_implementation]` is missing)
 - #51922 (rename the llvm-tools component to llvm-tools-preview and tweak its image)
 - #51961 (Fix typo in /src/librustc_resolve/lib.rs)

Failed merges:

r? @ghost
@bors bors merged commit ee52862 into rust-lang:master Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic_implementation: Error message talks about the panic_impl lang item when missing
4 participants